package com.hangkong.service.impl;

import com.hangkong.dao.FlightcabinDao;
import com.hangkong.model.Flightcabin;
import com.hangkong.service.FlightcabinService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class FlightcabinServiceImpl implements FlightcabinService {

    @Resource
    private FlightcabinDao flightcabinDao;

    public Flightcabin insert(Flightcabin obj) {
        return flightcabinDao.insert(obj);
    }

    public Flightcabin del(Integer id) {
        return flightcabinDao.del(id);
    }

    public List<Flightcabin> get() {
        return flightcabinDao.get();
    }

    @Override
    public Integer subflightcabin(String flightNo, String flightCabin) {
        return  flightcabinDao.subflightcabin(flightNo,flightCabin);
    }
}
